import request from "./request.js"
export const HomeList = ()=>request.get("/index/index");
export const Category = (id)=>request.get("/goods/category",{params:{
    id
}});
export const currentCategory = (categoryId)=>request.get('/goods/list',{
    params:{
        categoryId,
    }
})
export const Search = ()=>request.get('/search/index')
export const SearchList = (keyword)=>request.get('/search/helper',{params:{
    keyword
}})
export const Brand = (id)=>request.get('/brand/detail',{
    params:{
        id
    }
})
export const goods_detail = (id)=>request.get('/goods/detail',{
    params:{
        id
    }
})
export const goods_related = (id)=>request.get('/goods/related',{
    params:{
        id
    }
})
// 搜索框商品搜索
export const goods_list = (v)=>request.get('/goods/list',v)
// 删除搜索记录
export const delHistory = ()=>request.get('/search/clearhistory')
// 加入购物车
export const cart_add = (v)=>request.post('/cart/add',v)
// 获取购物车商品
export const cart_index = ()=>request.get('/cart/index')
// 点击切换商品选中状态
export const cart_checked = (v)=>request.post('/cart/checked',v)
// 商品步进器
export const cart_update = (v)=>request.post('/cart/update',v)
// 删除商品
export const cart_delete = (v)=>request.post('/cart/delete',v)
// 获取购物车商品数量
export const cart_goodscount =()=>request.get('/cart/goodscount')
